<div id="content">
<?php
  include_once("metier/pilote.class.php") ;
  include_once("metier/points.class.php") ;
  include_once("metier/ecurie.class.php") ;
  include_once("metier/login.class.php") ;
  include_once("metier/finance.class.php") ;
  include_once("metier/sponsor.class.php") ;
  include_once("metier/sponsorise.class.php") ;
  include_once("metier/photo.class.php") ;
  include_once("metier/course.class.php") ;
  include_once("metier/essais.class.php") ;
  include_once("metier/pays.class.php") ;
  include_once("metier/grandPrix.class.php") ;
  include_once("metier/circuit.class.php") ;
  include_once("metier/fournisseur.class.php") ;
  include_once("metier/voiture.class.php") ;
  include_once("metier/typeVoiture.class.php") ;
  include_once("presentation/pdo.php") ;
  include_once("util/dateUtil.php") ;
  include_once("util/uploadUtil.php") ;
  
  
  
	if (!empty($_GET["page"]))
	{
		$page=$_GET["page"];
	}
	else
	{
		$page=0;
	}
	if(isset($_SESSION['login']))
	{
		switch ($page) {
		
			// AFFICHAGE DE LA PAGE D'ACCUEIL
			case 0:
				include ('presentation/accueil.php') ;
				break;
			// 
			case 1: 
				include ('presentation/pilotes.php') ;
				break;
			// 
			case 2:
				include ('presentation/circuits.php') ;
				break;
			// 
			case 3:
				include ('presentation/ecuries.php') ;
				break;
			// 
			case 4:
				include ('presentation/resultats.php') ;
				break;
		
			// 
			case 5:
				include ('admin/admin.php') ;
				break;
				
			// ABOUT US
			case 6:
				include ('presentation/about.php') ;	
				break;
					
			// CONTACT US
			case 7:
				include ('presentation/contact.php') ;	
				break;
				
			// FIL D'ARIANE
			case 8:	
				include ('presentation/fil.php') ;
				break;

			// FIL D'ARIANE
			case 9:	
				include ('presentation/grandsPrix.php') ;
				break;
				
			
			// GESTION DES PILOTES
			case 10:
				include ('admin/pilotes/creationPilote.php') ;
				break;
			case 11:
				include ('admin/pilotes/modificationPilote.php') ;
				break;
			case 12:
				include ('admin/pilotes/suppressionPilote.php') ;
				break;
				
			// GESTION DES CIRCUITS
			case 20:
				include ('admin/circuits/creationCircuit.php') ;
				break;
			case 21:
				include ('admin/circuits/modificationCircuit.php') ;
				break;
			case 22:
				include ('admin/circuits/suppressionCircuit.php') ;
				break;
				
			// GESTION DES ECURIES
			case 30:
				include ('admin/ecuries/creationEcurie.php') ;
				break;
			case 31:
				include ('admin/ecuries/modificationEcurie.php') ;
				break;
			case 32:
				include ('admin/ecuries/suppressionEcurie.php') ;
				break;
				
			// GESTION DES RESULTATS
			case 40:
				include ('admin/resultats/miseAJourResultats.php') ;
				break;
				
			// GESTION DES ECURIES
			case 90:
				include ('admin/grandsPrix/creationGP.php') ;
				break;
			case 91:
				include ('admin/grandsPrix/modificationGP.php') ;
				break;
			case 92:
				include ('admin/grandsPrix/suppressionGP.php') ;
				break;
		}
	}
	else
	{
		switch ($page) {
		
			// AFFICHAGE DE LA PAGE D'ACCUEIL
			case 0:
				include ('presentation/accueil.php') ;
				break;
			// 
			case 1: 
				include ('presentation/pilotes.php') ;
				break;
			// 
			case 2:
				include ('presentation/circuits.php') ;
				break;
			// 
			case 3:
				include ('presentation/ecuries.php') ;
				break;
			// 
			case 4:
				include ('presentation/resultats.php') ;
				break;
		
			// 
			case 5:
				include ('admin/admin.php') ;
				break;
				
			// ABOUT US
			case 6:
				include ('presentation/about.php') ;	
				break;
					
			// CONTACT US
			case 7:
				include ('presentation/contact.php') ;	
				break;
				
			// FIL D'ARIANE
			case 8:	
				include ('presentation/fil.php') ;
				break;
				
			default: 
				echo "Page inexistante ! " ;
				break ;
		}
	}
	
?>
</div>
